<%--
  @desc: 系统用户列表
  @author: chenw
  @create: 2014-5-26 AM 11:44
--%>
<%@ page contentType="text/html;charset=utf-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<style type="text/css">
    .keywords {
        width: 250px;
        font-family: '微软雅黑', sans-serif, serif;
    }
</style>
<div class="pageHeader">
    <form rel="pageForm" onsubmit="return navTabSearch(this);" action="<c:url value='/sys/user/list'/>" method="post">
        <div class="searchBar">
            <ul>
                <li style="float: left;line-height: 25px;">
                    <label style="width: 50px;">关键字：</label>
                    <input name="keywords" type="text" value="${query.keywords}" placeholder="请输入登录账号、姓名、电话进行检索" class="keywords"/>
                </li>
                <li>
                    <div class="buttonActive" style="margin-left: 5px;">
                        <div class="buttonContent">
                            <button type="submit">查找</button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </form>
</div>
<div class="pageContent" style="padding-top: 1px;">
    <div class="panelBar">
        <ul class="toolBar" style="float: left;display: inline-block;">
            <li><a class="add" href="<c:url value='/sys/user/view/0'/>" target="dialog" width="520" height="280" mask="true" resizable="false"
                   maxable="false" title="新增用户"><span>新增</span></a></li>
            <li class="line"></li>
            <li><a class="add" href="<c:url value='/sys/user/view/{sel_id}'/>" target="dialog" width="520" height="280" mask="true" resizable="false"
                   maxable="false" title="查看用户" rel="dlg_sys_user_view"><span>查看</span></a></li>
            <li class="line"></li>
            <li><a class="delete" href="<c:url value='/sys/user/del/{sel_id}'/>" target="ajaxDel" title="是否确认删除当前用户？"><span>删除</span></a></li>
            <li class="line"></li>
            <li><a class="add" href="<c:url value='/sys/user/tree/role/{sel_id}'/>" target="dialog" width="500" height="500" mask="true"
                   resizable="false"
                   maxable="false" title="绑定用户角色" rel="dlg_sys_user_view"><span>角色绑定</span></a></li>
            <li><a class="add" href="<c:url value='/sys/user/change/{sel_id}'/>" target="dialog" width="500" height="250" mask="true"
                   resizable="false"
                   maxable="false" title="用户状态更新" rel="dlg_sys_user_view"><span>状态更新</span></a></li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="114">
        <thead>
        <tr>
            <th width="40" align="center">序号</th>
            <th width="80">登录账号</th>
            <th width="110">真实姓名</th>
            <th>邮箱地址</th>
            <th width="120" orderField="time" <c:if test='${query.orderField eq "time" }'> class="${query.orderDirection}"</c:if>>联系电话</th>
            <th>状态</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach var="user" items="${pager.list}" varStatus="vs">
            <tr target="sel_id" rel="${user.id}">
                <td>${vs.count+(pager.pageNum-1)*pager.numPerPage}</td>
                <td>${user.loginId}</td>
                <td>${user.realName}</td>
                <td>${user.email}</td>
                <td>${user.tel}</td>
                <c:if test="${user.status == -1}">
	                <td>锁定</td>
                </c:if>
                <c:if test="${user.status == 0}">
	                <td>正常</td>
                </c:if>
                <c:if test="${user.status == 1}">
	                <td>禁用</td>
                </c:if>
                <c:if test="${user.status == 2}">
	                <td>审核</td>
                </c:if>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="panelBar">
        <div class="pages">
            <span>显示&nbsp;</span>
            <label for="cob_ps"></label><select id="cob_ps" class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
            <option value="20">20</option>
            <option value="50">50</option>
            <option value="100">100</option>
            <option value="200">200</option>
        </select>
            <span>条，共${pager.total}条</span>
        </div>
        <div class="pagination" targetType="navTab" totalCount="${pager.total}" numPerPage="${pager.numPerPage}" pageNumShown="10"
             currentPage="${pager.pageNum}"></div>
    </div>
    <form id="pagerForm" method="post" action="<c:url value='/sys/user/list'/>">
        <input type="hidden" name="pageNum" value="${pager.pageNum}"/>
        <input type="hidden" name="keywords" value="${query.keywords}"/>
        <input type="hidden" name="numPerPage" value="${pager.numPerPage}"/>
        <input type="hidden" name="orderField" value="${query.orderField}"/>
        <input type="hidden" name="orderDirection" value="${query.orderDirection}"/>
    </form>
</div>
